<template>
  <!-- 钱包余额 -->
  <div class="my-wallet">
    <div class="wallet">
      <div class="wallet-icon">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-qianbao"></use>
        </svg>
      </div>
      <div class="my-wallet-word">我的钱包</div>
    </div>
    <div class="my-money">
      <div class="my-money-item">
        <span>{{balance ? balance:0 }}</span>
        <span>账户余额</span>
      </div>
      <div class="my-money-item">
        <span>0.00</span>
        <span>领券</span>
      </div>
      <div class="my-money-item">
        <span>0张</span>
        <span>银行卡</span>
      </div>
    </div>
  </div>
</template>

<script>
import { toRefs,reactive } from '@vue/reactivity';
export default {
  props:{
   balance:{
      type:Number,
      default:0.00
    }
  },
  setup(props) {
    const state = reactive({
      balance:props.balance
    })
    return {
      ...toRefs(state)
    };
  },
};
</script>
<style scoped>
.my-wallet {
  background: #fff;
  margin-top: .4267rem;
  width: 100%;
}
.wallet {
  display: flex;
  padding: .2133rem 0 .2133rem .4267rem;
  border-bottom: .0427rem solid #f4f4f4;
  align-items: center;
}
.wallet-icon svg.icon {
  width: 1.4507rem;
  height: 1.4507rem;
}
.my-wallet-word {
  margin-left: .4267rem;
}
.my-money {
  display: flex;
  padding: .64rem 0 0 0;
  box-sizing: border-box;
  height: 3.4133rem;
  text-align: center;
}
.my-money-item {
  flex: 1;
}
.my-money-item > span:nth-child(1) {
  display: block;
  color: #4d4d4d;
  font-size: .64rem;
}
.my-money-item > span:nth-child(2) {
  display: block;
  color: #888888;
  padding-top: .3413rem;
  font-size: .4267rem;
}
</style>
